home *** CD-ROM | disk | FTP | other *** search
/ CSi Master: Ableton Live 5 / CSi Master: Ableton Live 5.iso / pc / rsrc / locrsrc / mtprsrc.dir / Internal_17_CTcheckNumber.ls < prev    next >
Encoding:
Text File  |  2005-10-31  |  34.2 KB  |  728 lines

  1. on CTchecknumber
  2.   global CTprefspath, gWhatcd, csiAppFolderForInstall
  3.   initPrefs = "Hello!"
  4.   if gWhatcd = "Live 5 CSi MASTER" then
  5.     S1 = char 1 of field "serial no field 3"
  6.     S2 = char 2 of field "serial no field 3"
  7.     S3 = char 3 of field "serial no field 3"
  8.     S4 = char 1 of field "serial no field 4"
  9.     S5 = char 2 of field "serial no field 4"
  10.     S6 = char 3 of field "serial no field 4"
  11.     SR = 0
  12.     SS = 0
  13.     ST = 0
  14.     SU = 0
  15.     SV = 0
  16.     SW = 0
  17.     SR = (S1 * S2) + 1
  18.     SS = (S3 * S4) + 1
  19.     ST = (S5 * S6) + ((S5 + S6) * 0.5)
  20.     SU = SR * SS * 77
  21.     SV = ST + 21
  22.     SW = (SU * SV) + 514
  23.     SW = integer(SW)
  24.     SW = string(SW)
  25.     repeat while the number of chars in SW > 3
  26.       delete char 1 of SW
  27.     end repeat
  28.     sa = char 1 of SW
  29.     SB = char 2 of SW
  30.     SC = char 3 of SW
  31.     vMatchSerial = "CSM11-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  32.     vMatchSerialORG = the text of field "serial no field 1" & "-" & the text of field "serial no field 2" & "-" & the text of field "serial no field 3" & "-" & the text of field "serial no field 4"
  33.     if vMatchSerialORG = vMatchSerial then
  34.       baCreateFolder(csiAppFolderForInstall & "CSi")
  35.       if the machineType <> 256 then
  36.         baCreateFolder(csiAppFolderForInstall & "CSi:Prefs")
  37.       else
  38.         baCreateFolder(csiAppFolderForInstall & "CSi\Prefs")
  39.       end if
  40.       writeTextFile(CTprefspath, initPrefs)
  41.       set the textStyle of field "subtopics" to "plain"
  42.       go("PT select")
  43.       set the textStyle of field "map list" to "plain"
  44.     else
  45.       incorrectSerial()
  46.     end if
  47.   else
  48.     if gWhatcd = "CSi vol.4" then
  49.       S1 = char 11 of field "serial no field"
  50.       S2 = char 12 of field "serial no field"
  51.       S3 = char 13 of field "serial no field"
  52.       S4 = char 15 of field "serial no field"
  53.       S5 = char 16 of field "serial no field"
  54.       S6 = char 17 of field "serial no field"
  55.       SR = 0
  56.       SS = 0
  57.       ST = 0
  58.       SU = 0
  59.       SV = 0
  60.       SW = 0
  61.       SR = (S1 * S2) + 1
  62.       SS = (S3 * S4) + 1
  63.       ST = (S5 * S6) + ((S5 + S6) * 0.5)
  64.       SU = SR * SS * 21
  65.       SV = ST + 21
  66.       SW = (SU * SV) + 514
  67.       SW = integer(SW)
  68.       SW = string(SW)
  69.       repeat while the number of chars in SW > 3
  70.         delete char 1 of SW
  71.       end repeat
  72.       sa = char 1 of SW
  73.       SB = char 2 of SW
  74.       SC = char 3 of SW
  75.       vMatchSerial = "CSi04-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  76.       if the text of field "serial no field" = vMatchSerial then
  77.         writeTextFile(CTprefspath, initPrefs)
  78.         set the textStyle of field "subtopics" to "plain"
  79.         go("PT select")
  80.         set the textStyle of field "map list" to "plain"
  81.       else
  82.         incorrectSerial()
  83.       end if
  84.     else
  85.       if gWhatcd = "CSi ST1" then
  86.         S1 = char 11 of field "serial no field"
  87.         S2 = char 12 of field "serial no field"
  88.         S3 = char 13 of field "serial no field"
  89.         S4 = char 15 of field "serial no field"
  90.         S5 = char 16 of field "serial no field"
  91.         S6 = char 17 of field "serial no field"
  92.         SR = 0
  93.         SS = 0
  94.         ST = 0
  95.         SU = 0
  96.         SV = 0
  97.         SW = 0
  98.         SR = (S1 * S2) + 1
  99.         SS = (S3 * S4) + 1
  100.         ST = (S5 * S6) + ((S5 + S6) * 0.5)
  101.         SU = SR * SS * 63
  102.         SV = ST + 21
  103.         SW = (SU * SV) + 514
  104.         SW = integer(SW)
  105.         SW = string(SW)
  106.         repeat while the number of chars in SW > 3
  107.           delete char 1 of SW
  108.         end repeat
  109.         sa = char 1 of SW
  110.         SB = char 2 of SW
  111.         SC = char 3 of SW
  112.         vMatchSerial = "ST001-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  113.         if the text of field "serial no field" = vMatchSerial then
  114.           writeTextFile(CTprefspath, initPrefs)
  115.           set the textStyle of field "subtopics" to "plain"
  116.           go("PT select")
  117.           set the textStyle of field "map list" to "plain"
  118.         else
  119.           incorrectSerial()
  120.         end if
  121.       else
  122.         if gWhatcd = "CSi MT Plug-ins" then
  123.           S1 = char 11 of field "serial no field"
  124.           S2 = char 12 of field "serial no field"
  125.           S3 = char 13 of field "serial no field"
  126.           S4 = char 15 of field "serial no field"
  127.           S5 = char 16 of field "serial no field"
  128.           S6 = char 17 of field "serial no field"
  129.           SR = 0
  130.           SS = 0
  131.           ST = 0
  132.           SU = 0
  133.           SV = 0
  134.           SW = 0
  135.           SR = (S1 * S2) + 1
  136.           SS = (S3 * S4) + 1
  137.           ST = (S5 * S6) + ((S5 + S6) * 0.5)
  138.           SU = SR * SS * 56
  139.           SV = ST + 21
  140.           SW = (SU * SV) + 514
  141.           SW = integer(SW)
  142.           SW = string(SW)
  143.           repeat while the number of chars in SW > 3
  144.             delete char 1 of SW
  145.           end repeat
  146.           sa = char 1 of SW
  147.           SB = char 2 of SW
  148.           SC = char 3 of SW
  149.           vMatchSerial = "MT001-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  150.           if the text of field "serial no field" = vMatchSerial then
  151.             writeTextFile(CTprefspath, initPrefs)
  152.             set the textStyle of field "subtopics" to "plain"
  153.             go("PT select")
  154.             set the textStyle of field "map list" to "plain"
  155.           else
  156.             incorrectSerial()
  157.           end if
  158.         else
  159.           if gWhatcd = "CubaseSX2 CSi STARTER" then
  160.             S1 = char 11 of field "serial no field"
  161.             S2 = char 12 of field "serial no field"
  162.             S3 = char 13 of field "serial no field"
  163.             S4 = char 15 of field "serial no field"
  164.             S5 = char 16 of field "serial no field"
  165.             S6 = char 17 of field "serial no field"
  166.             SR = 0
  167.             SS = 0
  168.             ST = 0
  169.             SU = 0
  170.             SV = 0
  171.             SW = 0
  172.             SR = (S1 * S2) + 1
  173.             SS = (S3 * S4) + 1
  174.             ST = (S5 * S6) + ((S5 + S6) * 0.5)
  175.             SU = SR * SS * 105
  176.             SV = ST + 21
  177.             SW = (SU * SV) + 514
  178.             SW = integer(SW)
  179.             SW = string(SW)
  180.             repeat while the number of chars in SW > 3
  181.               delete char 1 of SW
  182.             end repeat
  183.             sa = char 1 of SW
  184.             SB = char 2 of SW
  185.             SC = char 3 of SW
  186.             vMatchSerial = "CSS03-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  187.             if the text of field "serial no field" = vMatchSerial then
  188.               writeTextFile(CTprefspath, initPrefs)
  189.               set the textStyle of field "subtopics" to "plain"
  190.               go("PT select")
  191.               set the textStyle of field "map list" to "plain"
  192.             else
  193.               incorrectSerial()
  194.             end if
  195.           else
  196.             if gWhatcd = "Reason CSi MASTER" then
  197.               S1 = char 11 of field "serial no field"
  198.               S2 = char 12 of field "serial no field"
  199.               S3 = char 13 of field "serial no field"
  200.               S4 = char 15 of field "serial no field"
  201.               S5 = char 16 of field "serial no field"
  202.               S6 = char 17 of field "serial no field"
  203.               SR = 0
  204.               SS = 0
  205.               ST = 0
  206.               SU = 0
  207.               SV = 0
  208.               SW = 0
  209.               SR = (S1 * S2) + 1
  210.               SS = (S3 * S4) + 1
  211.               ST = (S5 * S6) + ((S5 + S6) * 0.5)
  212.               SU = SR * SS * 98
  213.               SV = ST + 21
  214.               SW = (SU * SV) + 514
  215.               SW = integer(SW)
  216.               SW = string(SW)
  217.               repeat while the number of chars in SW > 3
  218.                 delete char 1 of SW
  219.               end repeat
  220.               sa = char 1 of SW
  221.               SB = char 2 of SW
  222.               SC = char 3 of SW
  223.               vMatchSerial = "CSM03-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  224.               if the text of field "serial no field" = vMatchSerial then
  225.                 writeTextFile(CTprefspath, initPrefs)
  226.                 set the textStyle of field "subtopics" to "plain"
  227.                 go("PT select")
  228.                 set the textStyle of field "map list" to "plain"
  229.               else
  230.                 incorrectSerial()
  231.               end if
  232.             else
  233.               if gWhatcd = "Nuendo CSi MASTER" then
  234.                 S1 = char 11 of field "serial no field"
  235.                 S2 = char 12 of field "serial no field"
  236.                 S3 = char 13 of field "serial no field"
  237.                 S4 = char 15 of field "serial no field"
  238.                 S5 = char 16 of field "serial no field"
  239.                 S6 = char 17 of field "serial no field"
  240.                 SR = 0
  241.                 SS = 0
  242.                 ST = 0
  243.                 SU = 0
  244.                 SV = 0
  245.                 SW = 0
  246.                 SR = (S1 * S2) + 1
  247.                 SS = (S3 * S4) + 1
  248.                 ST = (S5 * S6) + ((S5 + S6) * 0.5)
  249.                 SU = SR * SS * 112
  250.                 SV = ST + 21
  251.                 SW = (SU * SV) + 514
  252.                 SW = integer(SW)
  253.                 SW = string(SW)
  254.                 repeat while the number of chars in SW > 3
  255.                   delete char 1 of SW
  256.                 end repeat
  257.                 sa = char 1 of SW
  258.                 SB = char 2 of SW
  259.                 SC = char 3 of SW
  260.                 vMatchSerial = "CSM04-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  261.                 if the text of field "serial no field" = vMatchSerial then
  262.                   writeTextFile(CTprefspath, initPrefs)
  263.                   set the textStyle of field "subtopics" to "plain"
  264.                   go("PT select")
  265.                   set the textStyle of field "map list" to "plain"
  266.                 else
  267.                   incorrectSerial()
  268.                 end if
  269.               else
  270.                 if gWhatcd = "Logic CSi STARTER" then
  271.                   S1 = char 11 of field "serial no field"
  272.                   S2 = char 12 of field "serial no field"
  273.                   S3 = char 13 of field "serial no field"
  274.                   S4 = char 15 of field "serial no field"
  275.                   S5 = char 16 of field "serial no field"
  276.                   S6 = char 17 of field "serial no field"
  277.                   SR = 0
  278.                   SS = 0
  279.                   ST = 0
  280.                   SU = 0
  281.                   SV = 0
  282.                   SW = 0
  283.                   SR = (S1 * S2) + 1
  284.                   SS = (S3 * S4) + 1
  285.                   ST = (S5 * S6) + ((S5 + S6) * 0.5)
  286.                   SU = SR * SS * 126
  287.                   SV = ST + 21
  288.                   SW = (SU * SV) + 514
  289.                   SW = integer(SW)
  290.                   SW = string(SW)
  291.                   repeat while the number of chars in SW > 3
  292.                     delete char 1 of SW
  293.                   end repeat
  294.                   sa = char 1 of SW
  295.                   SB = char 2 of SW
  296.                   SC = char 3 of SW
  297.                   vMatchSerial = "CSS04-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  298.                   if the text of field "serial no field" = vMatchSerial then
  299.                     writeTextFile(CTprefspath, initPrefs)
  300.                     set the textStyle of field "subtopics" to "plain"
  301.                     go("PT select")
  302.                     set the textStyle of field "map list" to "plain"
  303.                   else
  304.                     incorrectSerial()
  305.                   end if
  306.                 else
  307.                   if gWhatcd = "DP4 CSi STARTER" then
  308.                     S1 = char 11 of field "serial no field"
  309.                     S2 = char 12 of field "serial no field"
  310.                     S3 = char 13 of field "serial no field"
  311.                     S4 = char 15 of field "serial no field"
  312.                     S5 = char 16 of field "serial no field"
  313.                     S6 = char 17 of field "serial no field"
  314.                     SR = 0
  315.                     SS = 0
  316.                     ST = 0
  317.                     SU = 0
  318.                     SV = 0
  319.                     SW = 0
  320.                     SR = (S1 * S2) + 1
  321.                     SS = (S3 * S4) + 1
  322.                     ST = (S5 * S6) + ((S5 + S6) * 0.5)
  323.                     SU = SR * SS * 133
  324.                     SV = ST + 21
  325.                     SW = (SU * SV) + 514
  326.                     SW = integer(SW)
  327.                     SW = string(SW)
  328.                     repeat while the number of chars in SW > 3
  329.                       delete char 1 of SW
  330.                     end repeat
  331.                     sa = char 1 of SW
  332.                     SB = char 2 of SW
  333.                     SC = char 3 of SW
  334.                     vMatchSerial = "CSS05-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  335.                     if the text of field "serial no field" = vMatchSerial then
  336.                       writeTextFile(CTprefspath, initPrefs)
  337.                       set the textStyle of field "subtopics" to "plain"
  338.                       go("PT select")
  339.                       set the textStyle of field "map list" to "plain"
  340.                     else
  341.                       incorrectSerial()
  342.                     end if
  343.                   else
  344.                     if gWhatcd = "Reason CSi STARTER" then
  345.                       S1 = char 11 of field "serial no field"
  346.                       S2 = char 12 of field "serial no field"
  347.                       S3 = char 13 of field "serial no field"
  348.                       S4 = char 15 of field "serial no field"
  349.                       S5 = char 16 of field "serial no field"
  350.                       S6 = char 17 of field "serial no field"
  351.                       SR = 0
  352.                       SS = 0
  353.                       ST = 0
  354.                       SU = 0
  355.                       SV = 0
  356.                       SW = 0
  357.                       SR = (S1 * S2) + 1
  358.                       SS = (S3 * S4) + 1
  359.                       ST = (S5 * S6) + ((S5 + S6) * 0.5)
  360.                       SU = SR * SS * 140
  361.                       SV = ST + 21
  362.                       SW = (SU * SV) + 514
  363.                       SW = integer(SW)
  364.                       SW = string(SW)
  365.                       repeat while the number of chars in SW > 3
  366.                         delete char 1 of SW
  367.                       end repeat
  368.                       sa = char 1 of SW
  369.                       SB = char 2 of SW
  370.                       SC = char 3 of SW
  371.                       vMatchSerial = "CSS06-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  372.                       if the text of field "serial no field" = vMatchSerial then
  373.                         writeTextFile(CTprefspath, initPrefs)
  374.                         set the textStyle of field "subtopics" to "plain"
  375.                         go("PT select")
  376.                         set the textStyle of field "map list" to "plain"
  377.                       else
  378.                         incorrectSerial()
  379.                       end if
  380.                     else
  381.                       if gWhatcd = "Acid CSi STARTER" then
  382.                         S1 = char 11 of field "serial no field"
  383.                         S2 = char 12 of field "serial no field"
  384.                         S3 = char 13 of field "serial no field"
  385.                         S4 = char 15 of field "serial no field"
  386.                         S5 = char 16 of field "serial no field"
  387.                         S6 = char 17 of field "serial no field"
  388.                         SR = 0
  389.                         SS = 0
  390.                         ST = 0
  391.                         SU = 0
  392.                         SV = 0
  393.                         SW = 0
  394.                         SR = (S1 * S2) + 1
  395.                         SS = (S3 * S4) + 1
  396.                         ST = (S5 * S6) + ((S5 + S6) * 0.5)
  397.                         SU = SR * SS * 147
  398.                         SV = ST + 21
  399.                         SW = (SU * SV) + 514
  400.                         SW = integer(SW)
  401.                         SW = string(SW)
  402.                         repeat while the number of chars in SW > 3
  403.                           delete char 1 of SW
  404.                         end repeat
  405.                         sa = char 1 of SW
  406.                         SB = char 2 of SW
  407.                         SC = char 3 of SW
  408.                         vMatchSerial = "CSS08-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  409.                         if the text of field "serial no field" = vMatchSerial then
  410.                           writeTextFile(CTprefspath, initPrefs)
  411.                           set the textStyle of field "subtopics" to "plain"
  412.                           go("PT select")
  413.                           set the textStyle of field "map list" to "plain"
  414.                         else
  415.                           incorrectSerial()
  416.                         end if
  417.                       else
  418.                         if gWhatcd = "Waves CSi MASTER" then
  419.                           S1 = char 11 of field "serial no field"
  420.                           S2 = char 12 of field "serial no field"
  421.                           S3 = char 13 of field "serial no field"
  422.                           S4 = char 15 of field "serial no field"
  423.                           S5 = char 16 of field "serial no field"
  424.                           S6 = char 17 of field "serial no field"
  425.                           SR = 0
  426.                           SS = 0
  427.                           ST = 0
  428.                           SU = 0
  429.                           SV = 0
  430.                           SW = 0
  431.                           SR = (S1 * S2) + 1
  432.                           SS = (S3 * S4) + 1
  433.                           ST = (S5 * S6) + ((S5 + S6) * 0.5)
  434.                           SU = SR * SS * 84
  435.                           SV = ST + 21
  436.                           SW = (SU * SV) + 514
  437.                           SW = integer(SW)
  438.                           SW = string(SW)
  439.                           repeat while the number of chars in SW > 3
  440.                             delete char 1 of SW
  441.                           end repeat
  442.                           sa = char 1 of SW
  443.                           SB = char 2 of SW
  444.                           SC = char 3 of SW
  445.                           vMatchSerial = "CSM02-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  446.                           if the text of field "serial no field" = vMatchSerial then
  447.                             writeTextFile(CTprefspath, initPrefs)
  448.                             set the textStyle of field "subtopics" to "plain"
  449.                             go("PT select")
  450.                             set the textStyle of field "map list" to "plain"
  451.                           else
  452.                             incorrectSerial()
  453.                           end if
  454.                         else
  455.                           if gWhatcd = "CSi vol.10" then
  456.                             S1 = char 11 of field "serial no field"
  457.                             S2 = char 12 of field "serial no field"
  458.                             S3 = char 13 of field "serial no field"
  459.                             S4 = char 15 of field "serial no field"
  460.                             S5 = char 16 of field "serial no field"
  461.                             S6 = char 17 of field "serial no field"
  462.                             SR = 0
  463.                             SS = 0
  464.                             ST = 0
  465.                             SU = 0
  466.                             SV = 0
  467.                             SW = 0
  468.                             SR = (S1 * S2) + 1
  469.                             SS = (S3 * S4) + 1
  470.                             ST = (S5 * S6) + ((S5 + S6) * 0.5)
  471.                             SU = SR * SS * 77
  472.                             SV = ST + 21
  473.                             SW = (SU * SV) + 514
  474.                             SW = integer(SW)
  475.                             SW = string(SW)
  476.                             repeat while the number of chars in SW > 3
  477.                               delete char 1 of SW
  478.                             end repeat
  479.                             sa = char 1 of SW
  480.                             SB = char 2 of SW
  481.                             SC = char 3 of SW
  482.                             vMatchSerial = "CSi10-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  483.                             if the text of field "serial no field" = vMatchSerial then
  484.                               writeTextFile(CTprefspath, initPrefs)
  485.                               set the textStyle of field "subtopics" to "plain"
  486.                               go("PT select")
  487.                               set the textStyle of field "map list" to "plain"
  488.                             else
  489.                               incorrectSerial()
  490.                             end if
  491.                           else
  492.                             if gWhatcd = "DP4 CSi MASTER" then
  493.                               S1 = char 11 of field "serial no field"
  494.                               S2 = char 12 of field "serial no field"
  495.                               S3 = char 13 of field "serial no field"
  496.                               S4 = char 15 of field "serial no field"
  497.                               S5 = char 16 of field "serial no field"
  498.                               S6 = char 17 of field "serial no field"
  499.                               SR = 0
  500.                               SS = 0
  501.                               ST = 0
  502.                               SU = 0
  503.                               SV = 0
  504.                               SW = 0
  505.                               SR = (S1 * S2) + 1
  506.                               SS = (S3 * S4) + 1
  507.                               ST = (S5 * S6) + ((S5 + S6) * 0.5)
  508.                               SU = SR * SS * 70
  509.                               SV = ST + 21
  510.                               SW = (SU * SV) + 514
  511.                               SW = integer(SW)
  512.                               SW = string(SW)
  513.                               repeat while the number of chars in SW > 3
  514.                                 delete char 1 of SW
  515.                               end repeat
  516.                               sa = char 1 of SW
  517.                               SB = char 2 of SW
  518.                               SC = char 3 of SW
  519.                               vMatchSerial = "CSM01-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  520.                               if the text of field "serial no field" = vMatchSerial then
  521.                                 writeTextFile(CTprefspath, initPrefs)
  522.                                 set the textStyle of field "subtopics" to "plain"
  523.                                 go("PT select")
  524.                                 set the textStyle of field "map list" to "plain"
  525.                               else
  526.                                 incorrectSerial()
  527.                               end if
  528.                             else
  529.                               if gWhatcd = "CSi vol.8" then
  530.                                 S1 = char 11 of field "serial no field"
  531.                                 S2 = char 12 of field "serial no field"
  532.                                 S3 = char 13 of field "serial no field"
  533.                                 S4 = char 15 of field "serial no field"
  534.                                 S5 = char 16 of field "serial no field"
  535.                                 S6 = char 17 of field "serial no field"
  536.                                 SR = 0
  537.                                 SS = 0
  538.                                 ST = 0
  539.                                 SU = 0
  540.                                 SV = 0
  541.                                 SW = 0
  542.                                 SR = (S1 * S2) + 1
  543.                                 SS = (S3 * S4) + 1
  544.                                 ST = (S5 * S6) + ((S5 + S6) * 0.5)
  545.                                 SU = SR * SS * 56
  546.                                 SV = ST + 21
  547.                                 SW = (SU * SV) + 514
  548.                                 SW = integer(SW)
  549.                                 SW = string(SW)
  550.                                 repeat while the number of chars in SW > 3
  551.                                   delete char 1 of SW
  552.                                 end repeat
  553.                                 sa = char 1 of SW
  554.                                 SB = char 2 of SW
  555.                                 SC = char 3 of SW
  556.                                 vMatchSerial = "CSi08-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  557.                                 if the text of field "serial no field" = vMatchSerial then
  558.                                   writeTextFile(CTprefspath, initPrefs)
  559.                                   set the textStyle of field "subtopics" to "plain"
  560.                                   go("PT select")
  561.                                   set the textStyle of field "map list" to "plain"
  562.                                 else
  563.                                   incorrectSerial()
  564.                                 end if
  565.                               else
  566.                                 if gWhatcd = "CSi vol.7" then
  567.                                   S1 = char 11 of field "serial no field"
  568.                                   S2 = char 12 of field "serial no field"
  569.                                   S3 = char 13 of field "serial no field"
  570.                                   S4 = char 15 of field "serial no field"
  571.                                   S5 = char 16 of field "serial no field"
  572.                                   S6 = char 17 of field "serial no field"
  573.                                   SR = 0
  574.                                   SS = 0
  575.                                   ST = 0
  576.                                   SU = 0
  577.                                   SV = 0
  578.                                   SW = 0
  579.                                   SR = (S1 * S2) + 1
  580.                                   SS = (S3 * S4) + 1
  581.                                   ST = (S5 * S6) + ((S5 + S6) * 0.5)
  582.                                   SU = SR * SS * 42
  583.                                   SV = ST + 21
  584.                                   SW = (SU * SV) + 514
  585.                                   SW = integer(SW)
  586.                                   SW = string(SW)
  587.                                   repeat while the number of chars in SW > 3
  588.                                     delete char 1 of SW
  589.                                   end repeat
  590.                                   sa = char 1 of SW
  591.                                   SB = char 2 of SW
  592.                                   SC = char 3 of SW
  593.                                   vMatchSerial = "CSi07-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  594.                                   if the text of field "serial no field" = vMatchSerial then
  595.                                     writeTextFile(CTprefspath, initPrefs)
  596.                                     set the textStyle of field "subtopics" to "plain"
  597.                                     go("PT select")
  598.                                     set the textStyle of field "map list" to "plain"
  599.                                   else
  600.                                     incorrectSerial()
  601.                                   end if
  602.                                 else
  603.                                   if gWhatcd = "CSi vol.6" then
  604.                                     S1 = char 11 of field "serial no field"
  605.                                     S2 = char 12 of field "serial no field"
  606.                                     S3 = char 13 of field "serial no field"
  607.                                     S4 = char 15 of field "serial no field"
  608.                                     S5 = char 16 of field "serial no field"
  609.                                     S6 = char 17 of field "serial no field"
  610.                                     SR = 0
  611.                                     SS = 0
  612.                                     ST = 0
  613.                                     SU = 0
  614.                                     SV = 0
  615.                                     SW = 0
  616.                                     SR = (S1 * S2) + 1
  617.                                     SS = (S3 * S4) + 1
  618.                                     ST = (S5 * S6) + ((S5 + S6) * 0.5)
  619.                                     SU = SR * SS * 35
  620.                                     SV = ST + 21
  621.                                     SW = (SU * SV) + 514
  622.                                     SW = integer(SW)
  623.                                     SW = string(SW)
  624.                                     repeat while the number of chars in SW > 3
  625.                                       delete char 1 of SW
  626.                                     end repeat
  627.                                     sa = char 1 of SW
  628.                                     SB = char 2 of SW
  629.                                     SC = char 3 of SW
  630.                                     vMatchSerial = "CSi06-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  631.                                     if the text of field "serial no field" = vMatchSerial then
  632.                                       writeTextFile(CTprefspath, initPrefs)
  633.                                       set the textStyle of field "subtopics" to "plain"
  634.                                       go("PT select")
  635.                                       set the textStyle of field "map list" to "plain"
  636.                                     else
  637.                                       incorrectSerial()
  638.                                     end if
  639.                                   else
  640.                                     if gWhatcd = "CSi vol.5" then
  641.                                       S1 = char 11 of field "serial no field"
  642.                                       S2 = char 12 of field "serial no field"
  643.                                       S3 = char 13 of field "serial no field"
  644.                                       S4 = char 15 of field "serial no field"
  645.                                       S5 = char 16 of field "serial no field"
  646.                                       S6 = char 17 of field "serial no field"
  647.                                       SR = 0
  648.                                       SS = 0
  649.                                       ST = 0
  650.                                       SU = 0
  651.                                       SV = 0
  652.                                       SW = 0
  653.                                       SR = (S1 * S2) + 1
  654.                                       SS = (S3 * S4) + 1
  655.                                       ST = (S5 * S6) + ((S5 + S6) * 0.5)
  656.                                       SU = SR * SS * 28
  657.                                       SV = ST + 21
  658.                                       SW = (SU * SV) + 514
  659.                                       SW = integer(SW)
  660.                                       SW = string(SW)
  661.                                       repeat while the number of chars in SW > 3
  662.                                         delete char 1 of SW
  663.                                       end repeat
  664.                                       sa = char 1 of SW
  665.                                       SB = char 2 of SW
  666.                                       SC = char 3 of SW
  667.                                       vMatchSerial = "CSi05-" & SB & sa & SC & "-" & S1 & S2 & S3 & "-" & S4 & S5 & S6
  668.                                       if the text of field "serial no field" = vMatchSerial then
  669.                                         writeTextFile(CTprefspath, initPrefs)
  670.                                         set the textStyle of field "subtopics" to "plain"
  671.                                         go("PT select")
  672.                                         set the textStyle of field "map list" to "plain"
  673.                                       else
  674.                                         incorrectSerial()
  675.                                       end if
  676.                                     else
  677.                                       if gWhatcd = "CSi vol.3" then
  678.                                         if (char 1 of field "serial no field" = "c") and (char 2 of field "serial no field" = "s") and (char 3 of field "serial no field" = "i") and (char 6 of field "serial no field" = "-") and (char 7 of field "serial no field" = "c") and (char 13 of field "serial no field" = "-") and (char 14 of field "serial no field" = "1") and (the number of chars in field "serial no field" = 14) then
  679.                                           writeTextFile(CTprefspath, initPrefs)
  680.                                           set the textStyle of field "subtopics" to "plain"
  681.                                           go("PT select")
  682.                                           set the textStyle of field "map list" to "plain"
  683.                                         else
  684.                                           incorrectSerial()
  685.                                         end if
  686.                                       else
  687.                                         if gWhatcd = "CSi vol.2" then
  688.                                           if (char 1 of field "serial no field" = "c") and (char 2 of field "serial no field" = "s") and (char 3 of field "serial no field" = "i") and (char 6 of field "serial no field" = "-") and (char 7 of field "serial no field" = "b") and (char 13 of field "serial no field" = "-") and (char 14 of field "serial no field" = "1") and (the number of chars in field "serial no field" = 14) then
  689.                                             writeTextFile(CTprefspath, initPrefs)
  690.                                             set the textStyle of field "subtopics" to "plain"
  691.                                             go("PT select")
  692.                                             set the textStyle of field "map list" to "plain"
  693.                                           else
  694.                                             incorrectSerial()
  695.                                           end if
  696.                                         else
  697.                                           if gWhatcd = "CSi_vol1" then
  698.                                             if (char 1 of field "serial no field" = "c") and (char 2 of field "serial no field" = "s") and (char 3 of field "serial no field" = "i") and (char 6 of field "serial no field" = "-") and (char 7 of field "serial no field" = "a") and (char 13 of field "serial no field" = "-") and (char 14 of field "serial no field" = "1") and (the number of chars in field "serial no field" = 14) then
  699.                                               writeTextFile(CTprefspath, initPrefs)
  700.                                               set the textStyle of field "subtopics" to "plain"
  701.                                               go("PT select")
  702.                                               set the textStyle of field "map list" to "plain"
  703.                                             else
  704.                                               incorrectSerial()
  705.                                             end if
  706.                                           end if
  707.                                         end if
  708.                                       end if
  709.                                     end if
  710.                                   end if
  711.                                 end if
  712.                               end if
  713.                             end if
  714.                           end if
  715.                         end if
  716.                       end if
  717.                     end if
  718.                   end if
  719.                 end if
  720.               end if
  721.             end if
  722.           end if
  723.         end if
  724.       end if
  725.     end if
  726.   end if
  727. end
  728.